﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using HZ.MBSM.DBUtility;
using HZ.MBSM.Model;

public partial class HomePage_Boardinfo : System.Web.UI.Page
{
    public string id = "", strAccountName = "", strContent = "", strExplain = "", strTitle = "";
    protected void Page_Load(object sender, EventArgs e)
    {

        System.Collections.Generic.List<HZ.MBSM.DAL.AccountType> _AccountType = new System.Collections.Generic.List<HZ.MBSM.DAL.AccountType>();
        _AccountType.Add(HZ.MBSM.DAL.AccountType.enumAttorney);
        _AccountType.Add(HZ.MBSM.DAL.AccountType.enumCompany);
        _AccountType.Add(HZ.MBSM.DAL.AccountType.enumHospitale);
        _AccountType.Add(HZ.MBSM.DAL.AccountType.enumSupervise);
        _AccountType.Add(HZ.MBSM.DAL.AccountType.enumCheckGoods);
        _AccountType.Add(HZ.MBSM.DAL.AccountType.enumCheckCompany);
        _AccountType.Add(HZ.MBSM.DAL.AccountType.enumBidGoods);
        _AccountType.Add(HZ.MBSM.DAL.AccountType.enumCheckProjectComp);
        _AccountType.Add(HZ.MBSM.DAL.AccountType.enumZMedicine);
        _AccountType.Add(HZ.MBSM.DAL.AccountType.enumHMedicine);
        _AccountType.Add(HZ.MBSM.DAL.AccountType.enumZMedicineCompany);
        _AccountType.Add(HZ.MBSM.DAL.AccountType.enumHMedicineCompany);
        _AccountType.Add(HZ.MBSM.DAL.AccountType.enumSJCL);
        _AccountType.Add(HZ.MBSM.DAL.AccountType.enumComapanyRG);
        if (HZ.MBSM.BLL.Login.CheckAssert(_AccountType))
        {
            id = SysFun.IsSQL(MsgBox.JieMi_Decrypt(Request.QueryString["id"]));
            if (!IsPostBack)
            {
                InitPage();
            }
        }
    }
    private void InitPage()
    {
        string strSql = "select board.*,v_account.DWNAME from board inner join v_account on board.accountid=v_account.accountid where id='" + id + "'";
        Db db = new Db();
        System.Data.IDataReader dr;
        dr = db.DataReader(strSql);
        if (dr.Read())
        {
            strAccountName = SysFun.ToTrim(dr["DWNAME"]);
            strContent = SysFun.ToTrim(dr["Content"]);
            strExplain = SysFun.ToTrim(dr["Explain"]);
            strTitle = SysFun.ToTrim(dr["Title"]);
        }
        dr.Close();
        dr.Dispose();
        db.Close();
    }

}
